<?php 

include '../function.php';

$path = date("Y-m-d");

is_dir($path) || mkdir($path);

// for ($i=0; $i <100 ; $i++) { 

// 	$data = getNonceStr(mt_rand(1000,10000));
// 	file_put_contents($path."/box".$i.".txt", $data);
// }

$paths = glob($path.'/*');

 ?>
<!doctype html>
<html lang="en">
<head>
	<meta charset="UTF-8">
	<title>Document</title>
</head>
<body>
	<table border="1">
		<tr>
			<td>文件名</td>
			<td>大小</td>
			<td>创建时间</td>
			<td>操作</td>
		</tr>

		<?php foreach ($paths as $key => $row) { ?>
		
		<tr>
			<td><?php echo basename($row); ?></td>
			<td><?php echo filesize($row); ?></td>
			<td><?php echo Ftime(filectime($row)); ?></td>
			<td><a href="./del.php?url=<?php echo $row ?>">删除</a></td>
		</tr>

		<?php } ?>
		
	</table>
</body>
</html>
